package com.tmbb.hntt.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import com.tmbb.hntt.dto.NeroHate;

public interface NeroHateDao {
	
	/**
	 * @return
	 */
	List<NeroHate> getNeroHates();
	
	/**
	 * @return
	 */
	@Update("UPDATE hntt_change_group SET effdate = #{effectiveDate}, endOfMonthAvg = #{endOfMonthAvg}, averageRate = #{averageRate}, updateDate = #{updatedDate} WHERE currencyCode = #{currencyCode}")
	int updateNeroHate(NeroHate neroHate);
	
	/**
	 * @param NeroHate
	 * @return
	 */
	@Insert("INSERT INTO hntt_change_group (effdate, endOfMonthAvg, averageRate, updatedBy, updateDate) VALUES (#{effectiveDate}, #{endOfMonthAvg}, #{averageRate}, 'hntt', #{updatedDate})")
	int insertNeroHate(NeroHate neroHate);
	
	/**
	 * @param currencyCode
	 * @return
	 */
	@Delete("DELETE FROM hntt_change_group WHERE currencyCode = #{value}")
	int deleteNeroHate(String currencyCode);
}
